﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="ConnectToServer"
	x:Name="ConnectToServer1"
	Title="Connect To Server -- MChat"
	Width="559" Height="157" WindowStyle="None" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Background="#00FFFFFF" AllowsTransparency="True" xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" ShowInTaskbar="False" Icon="../Images/mChat.ico">
	<Window.Resources>
		<LinearGradientBrush x:Key="ToolbarBGBrush" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FF969696" Offset="0"/>
			<GradientStop Color="#FFA6A6A6" Offset="1"/>
		</LinearGradientBrush>
		<Storyboard x:Key="OnGotFocus1">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<LinearGradientBrush x:Key="HoverBrush" EndPoint="1,0.5" StartPoint="0,0.5">
			<GradientStop Color="#FFFFFEE3" Offset="0"/>
			<GradientStop Color="#FFFFE797" Offset="0.26"/>
			<GradientStop Color="#FFFFD734" Offset="0.545"/>
			<GradientStop Color="#FFFFE796" Offset="0.955"/>
		</LinearGradientBrush>
		<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#FF646464"/>
		<SolidColorBrush x:Key="DisabledBorderBrush" Color="#FFFFCF74"/>
		<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888"/>
		<Style x:Key="SimpleButton" TargetType="{x:Type Button}" BasedOn="{x:Null}">
			<!-- Setter Property="FocusVisualStyle" Value="{DynamicResource SimpleButtonFocusVisual}"/-->
			<Setter Property="Background" Value="#FF535353"/>
			<Setter Property="BorderBrush" Value="#FF535353"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
					
						<!-- We use Grid as a root because it is easy to add more elements to customize the button -->
						<Grid x:Name="Grid">
							<Border x:Name="Border" BorderBrush="#FF535353" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" IsEnabled="False" Background="{DynamicResource ToolbarBGBrush}"/>
						
							<!-- Content Presenter is where the text content etc is placed by the control -->
							<!-- The bindings are useful so that the control can be parameterized without editing the template -->
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
						</Grid>
					
						<!--Each state sets a brush on the Border in the template -->
						<ControlTemplate.Triggers>
							<Trigger Property="IsKeyboardFocused" Value="true">
							
								<!-- Setter Property="BorderBrush" Value="{DynamicResource DefaultedBorderBrush}" TargetName="Border"/-->
							</Trigger>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="BorderBrush" Value="#FFFFCF01" TargetName="Border"/>
							</Trigger>
							<Trigger Property="IsPressed" Value="true">
								<Setter Property="Foreground" Value="#FF000000"/>
								<Setter Property="Background" Value="{DynamicResource HoverBrush}" TargetName="Border"/>
								<Setter Property="BorderBrush" Value="#FFFFCF01" TargetName="Border"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="true"/>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
								<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
								<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	
	</Window.Resources>
	<Window.Triggers>
		<EventTrigger RoutedEvent="FocusManager.GotFocus" SourceName="servername"/>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded"/>
	</Window.Triggers>

	<Grid x:Name="LayoutRoot">
		<Image HorizontalAlignment="Right" Margin="0,5,4,0" VerticalAlignment="Top" Width="14" Height="15" Source="..\Images\close.png" Stretch="Fill" x:Name="Close" Panel.ZIndex="1"/>
		<Image HorizontalAlignment="Right" Margin="0,5.5,24,0" VerticalAlignment="Top" Width="14" Height="15" Source="..\Images\Minimize.png" Stretch="Fill" x:Name="Min" Panel.ZIndex="1"/>
		<Border Margin="-1,0,-1.847,0" VerticalAlignment="Top" Height="26.25" CornerRadius="5,4,0,0" BorderBrush="#00505050" BorderThickness="1,1,1,0" x:Name="Titlebar" Visibility="Visible">
			<Border.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FF969696" Offset="1"/>
					<GradientStop Color="#FFC2C2C2" Offset="0"/>
				</LinearGradientBrush>
			</Border.Background>
			<Label Height="Auto" Content="Connect to Server -- MChat" x:Name="Tblabel" FontStyle="Italic" d:IsStaticText="True" Width="152.847"/>
		</Border>
		<Image HorizontalAlignment="Left" Margin="4,3,0,0" VerticalAlignment="Top" Width="21" Height="21" Source="..\Images\mChat.ico" Stretch="Fill"/>
		<Border Margin="-0.152,25.576,0,0.174" CornerRadius="0,0,0,0" BorderBrush="#00505050" BorderThickness="0,0,0,0" x:Name="Titlebar_Copy" Background="{DynamicResource ToolbarBGBrush}" Visibility="Visible"/>
		<Label HorizontalAlignment="Left" Margin="5,39,0,0" VerticalAlignment="Top" Width="80" Height="24" Content="Server Name:"/>
		<Border Margin="109,42,0,0" VerticalAlignment="Top" Height="24" Background="#FFFFFFFF" CornerRadius="4,4,4,4" BorderBrush="{x:Null}" x:Name="border" RenderTransformOrigin="0.5,0.5" Width="168" HorizontalAlignment="Left">
			<Border.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="1" ScaleY="1"/>
					<SkewTransform AngleX="0" AngleY="0"/>
					<RotateTransform Angle="0"/>
					<TranslateTransform X="0" Y="0"/>
				</TransformGroup>
			</Border.RenderTransform>
			<Border.BitmapEffect>
				<OuterGlowBitmapEffect/>
			</Border.BitmapEffect>
			<Border.BitmapEffectInput>
				<BitmapEffectInput/>
			</Border.BitmapEffectInput>
			<TextBox Width="165" Height="22" Text="" TextWrapping="Wrap" BorderThickness="0,0,0,0" x:Name="servername"/>
		</Border>
		<Label HorizontalAlignment="Left" Margin="4,74,0,59" Width="94" Content="Server Address:"/>
		<Border BorderBrush="{x:Null}" RenderTransformOrigin="0.5,0.5" Margin="109,76,0,57" x:Name="border_Copy" Background="#FFFFFFFF" CornerRadius="4,4,4,4" Width="168" HorizontalAlignment="Left">
			<Border.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="1" ScaleY="1"/>
					<SkewTransform AngleX="0" AngleY="0"/>
					<RotateTransform Angle="0"/>
					<TranslateTransform X="0" Y="0"/>
				</TransformGroup>
			</Border.RenderTransform>
			<Border.BitmapEffect>
				<OuterGlowBitmapEffect/>
			</Border.BitmapEffect>
			<Border.BitmapEffectInput>
				<BitmapEffectInput/>
			</Border.BitmapEffectInput>
			<TextBox BorderThickness="0,0,0,0" x:Name="serveraddress" Width="165" Height="22" Text="" TextWrapping="Wrap"/>
		</Border>
		<Button Margin="226,0,226,8" Style="{DynamicResource SimpleButton}" VerticalAlignment="Bottom" Height="28" Content="Connect" Foreground="#FFFFFFFF" x:Name="Connect" BorderBrush="{x:Null}" Background="{x:Null}" FontStyle="Italic"/>
		<Label HorizontalAlignment="Right" VerticalAlignment="Top" Width="64" Height="26" Content="Username:" Margin="0,38,210,0"/>
		<Label HorizontalAlignment="Right" Margin="0,76,212,55" Width="62" Content="Password:"/>
		<Border BorderBrush="{x:Null}" RenderTransformOrigin="0.5,0.5" Margin="0,40,35,0" x:Name="border_Copy1" VerticalAlignment="Top" Height="24" Background="#FFFFFFFF" CornerRadius="4,4,4,4" Width="168" HorizontalAlignment="Right">
			<Border.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="1" ScaleY="1"/>
					<SkewTransform AngleX="0" AngleY="0"/>
					<RotateTransform Angle="0"/>
					<TranslateTransform X="0" Y="0"/>
				</TransformGroup>
			</Border.RenderTransform>
			<Border.BitmapEffect>
				<OuterGlowBitmapEffect/>
			</Border.BitmapEffect>
			<Border.BitmapEffectInput>
				<BitmapEffectInput/>
			</Border.BitmapEffectInput>
			<TextBox BorderThickness="0,0,0,0" x:Name="Username" Width="165" Height="22" Text="" TextWrapping="Wrap"/>
		</Border>
		<Border BorderBrush="{x:Null}" RenderTransformOrigin="0.5,0.5" Margin="0,77,36,56" x:Name="border_Copy2" Background="#FFFFFFFF" CornerRadius="4,4,4,4" Width="168" HorizontalAlignment="Right">
			<Border.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="1" ScaleY="1"/>
					<SkewTransform AngleX="0" AngleY="0"/>
					<RotateTransform Angle="0"/>
					<TranslateTransform X="0" Y="0"/>
				</TransformGroup>
			</Border.RenderTransform>
			<Border.BitmapEffect>
				<OuterGlowBitmapEffect/>
			</Border.BitmapEffect>
			<Border.BitmapEffectInput>
				<BitmapEffectInput/>
			</Border.BitmapEffectInput>
			<TextBox BorderThickness="0,0,0,0" x:Name="Password" Width="165" Height="22" Text="" TextWrapping="Wrap"/>
		</Border>
	</Grid>
</Window>